﻿@model ComicBook.web.Models.AuthorComicsVM

<h2>AuthorDetail</h2>

<div>
    <table class="table table-hover">
        <tr>
            <td>
                <h4 class="pull-left">Author Details</h4>
            </td>
        </tr>
        <tr>
            <td>
                <img src="@Model.Author.Image" style="width:80px;height:80px" class="pull-left" />
                <h4 class="text-left">@Model.Author.Name</h4>
                <button class="btn btn-sm btn-warning pull-right" onclick="location.href='/Author/EditAuthor/@Model.Author.Id'">Edit Author</button>
            </td>
        </tr>
    </table>
</div>
<div>
    <table class="table table-hover">
        <tr><th colspan="2">Comic List</th></tr>
        @foreach (var c in @Model.Comics)
        {
            <tr onclick="location.href='/Comic/ComicDetail/@c.Id'">
                <td>
                    <img src="@c.Image" style="height:50px;width:50px" />
                </td>
                <td class="text-left">@c.Title</td>
            </tr>
        }
    </table>

</div>
    
